import Mock from 'mockjs'
let detail={
  id:0,
    img:[
        {img:require('../../assets/img/detail/1.jpg'),active:true},
        {img:require('../../assets/img/detail/2.jpg'),active:false},
        {img:require('../../assets/img/detail/3.jpg'),active:false},
        {img:require('../../assets/img/detail/4.jpg'),active:false},
    ],
    title:"一往情深",
    xl:'[经典爆款,年销售冠军]',
    type:'精品玫瑰礼盒:19枝卡罗拉红玫瑰,勿忘我1枝',
    price:248,
    d_price:315,
    hy:'你的轻柔像阵微风,让我从容不迫,想让你知道,我对你始终一往情深',
    cl:'高档礼盒装鲜花:19枝拉罗拉红玫瑰,勿忘我1枝',
    bz:'牛皮纸盒深咖啡色条纹纸,银色缎带花结,魔力铁山灰包装盒',
    xz:[
      {
      img:require('../../assets/img/detail/5.jpg'),
      text:'一往情深',
      active:true
    },
      {
      img:require('../../assets/img/detail/6.jpg'),
      text:'你最珍贵',
      active:false
    },
      {
      img:require('../../assets/img/detail/7.jpg'),
      text:'挚爱一生/新款',
      active:false
    },
      {
      img:require('../../assets/img/detail/8.jpg'),
      text:'可爱女人/新款',
      active:false
    },
      {
      img:require('../../assets/img/detail/9.jpg'),
      text:'暖暖',
      active:false
    },
      {
      img:require('../../assets/img/detail/9.jpg'),
      text:'一如初见',
      active:false
    },
  ]
  }
  let url = "http://127.0.0.1:8080"
  //商品详情接口
  Mock.mock(`${url}/detail`,'post',options => {
    let data = JSON.parse(options.body)  
    console.log(data)  
    return{
        code:1,
        info:detail,
        msg:'商品数据获取成功'
    } 
  })